Skip to content

Add filter to custom service icon - #45270

Closed
yannkozon wants to merge 1 commit into
WordPress:trunkfrom
yannkozon:patch-1
Closed

yannkozon wants to merge 1 commit into
WordPress:trunkfrom
yannkozon:patch-1

Conversation

@yannkozon

Copy link
Copy Markdown

What?

Add filter to custom service icon for social-link blocks

Why?

A simply filter for custom service icon

Testing Instructions

function example_callback( $value, $service ) {

	if( $service === 'facebook' ) {
		return '<svg width="24" height="24" ...></svg>';
	}

    return $value;
}
add_filter( 'social_link_icon', 'example_callback', 10, 2 );

@yannkozon
yannkozon requested a review from ajitbohra as a code owner October 25, 2022 09:32
@github-actions github-actions Bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Oct 25, 2022
@github-actions

Copy link
Copy Markdown

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @yannkozon! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@Soean Soean added [Block] Social Affects the Social Block - used to display Social Media accounts [Type] Enhancement A suggestion for improvement. labels Oct 25, 2022
@skorasaurus

skorasaurus commented Oct 25, 2022 •

Copy link
Copy Markdown
Member

This is certainly a lot simpler than #30749 although I haven't looked at any of the code or any of the discussion there.

@ChrissiQ

Copy link
Copy Markdown

I believe it is simpler because it is only doing the PHP half of the equation. I think this filter will not affect the block editor, only the front end. So the other PR is more complete.

@yannkozon yannkozon closed this by deleting the head repository Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Social Affects the Social Block - used to display Social Media accounts First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants